package router

import (
	"github.com/gin-gonic/gin"
	"order_bff/controller"
)

func InitRouter() *gin.Engine {
	router := gin.Default()
	router.POST("/create/car", controller.CreateCar)     //创建车型
	router.GET("/car/detail", controller.CarDetail)      //获取车型详情
	router.POST("/create/order", controller.CreateOrder) //创建订单
	router.POST("/alipay", controller.CreateAliPay)      //生成支付链接
	router.GET("/return", controller.Return)             //返回订单信息
	router.Any("/notify", controller.Notify)             //支付回调 修改订单信息
	router.Any("/delete", controller.DeleteOrder)        //删除订单
	return router
}
